package net.oschina.tkj.chapter19.testenum;

import net.oschina.tkj.chapter19.enumclass.StudentEnum;

public class TestStudentEnum {
	public static void main(String[] args) {

		for (StudentEnum s : StudentEnum.values()) {
			System.out.println(s.ordinal());
			System.out.println(s.compareTo(StudentEnum.ADDRESS));
			System.out.println(s.equals(StudentEnum.ADDRESS));
			System.out.println(s == StudentEnum.ADDRESS);
			System.out.println(s.name());
			System.out.println(s.toString());
			System.out.println("========================");
		}

		System.out.println(Enum.valueOf(StudentEnum.class,
				StudentEnum.SNAME.name()));

	}
}
